/************************************************************************
                        Person.h.h - Copyright asaf
**************************************************************************/
#ifndef PERSON_H
#define PERSON_H
#include "../Shered/Object.h"
#include <string>
//#include <vector>
using namespace std;
/**
  * class Person
  * basic user data (all types)
  * main key is ID
  */
class Person : virtual public Object
{
public:

		//Constructors/Destructors
		//empty ctor
		Person ();
		//copy ctor
		Person(const Person &p);
		//main ctror
		Person (const string &ID,string FirstName="",string LastName="",int type=0,int privileges=0,int semester=0,string address="",int birthDay=0,int birthMonth=0,int birthYear=0);
		//dtor
		virtual ~Person ( );
		//comparison operator by main key
		bool operator==(const Person &rhs);

		//getters/setters
		string getID ();
		void setFirstName ( string new_var );
		string getFirstName ( );
		void setLastName ( string new_var );
		string getLastName ( );
		void setPermission (int new_var);
		int getPermission ();
		void setSemester (int new_var);
		int getSemester ();
		int getType ( );
		void setID ( string new_var );
		void setType ( int new_var );

		string getAddress()const;
		void setAddress(string a);

		int getBirthDay()const;
		int getBirthMonth()const;
		int getBirthYear()const;

		void setBirthDay(int t);
		void setBirthMonth(int t);
		void setBirthYear(int t);

private:
		//user ID (main key)
		string m_ID;
		//first name
		string m_FirstName;
		//last name
		string m_LastName;
		//resident address
		string m_address;
		//date of birth (day/month/year)
		int m_birthDay;
		int m_birthMonth;
		int m_birthYear;
		//type of user
		int m_type;//person type (STUDENT,LECTURER,...)
		//privileges in the system,describes the types of action a user can do in the system
		int m_permission;
		//current semester the user is in (for student),Learning year for lecturer
		int m_semester;
		//copy operator (deprecated)
		Person &operator=(const Person &rhs);
};

#endif // PERSON_H
